package com.behome.netty.common.enums;

/**
 * TerminalWorkStatus
 *
 * @author bh_ljy
 * @version 2024/05/15 16:20
 **/
public enum TerminalWorkStatus {
    FREE((byte) 1, "空闲"),
    WORKING((byte) 2, "工作"),
    FAULT((byte) 3, "故障");

    private byte value;
    private String name;

    public byte getValue() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }

    private TerminalWorkStatus(byte value, String name) {
        this.value = value;
        this.name = name;
    }

    public static TerminalWorkStatus getEnumByValue(byte value) {
        TerminalWorkStatus[] var1 = values();
        for (TerminalWorkStatus type : var1) {
            if (type.value == value) {
                return type;
            }
        }
        return FREE;
    }

    public String toString() {
        return "(终端工作状态:" + this.name + ")";
    }
}
